package com.wgo.bpot.server.persist;

import com.wgo.bpot.common.transport.servicefacade.UniqueValueFactory;


public abstract class BasicPersistService implements PersistService {
	private UniqueValueFactory uniqueValueFactory;
//    private static final ResourceBundle RESOURCE_BUNDLE;
    private Class rootConceptClass;

//    static {
//        RESOURCE_BUNDLE = PropertyResourceBundle.getBundle("domain");
//    }

	public UniqueValueFactory getUniqueValueFactory() {
		return uniqueValueFactory;
	}

	public void setUniqueValueFactory(BasicUniqueValueFactory uniqueValueFactory) {
		this.uniqueValueFactory = uniqueValueFactory;
		uniqueValueFactory.setPersistService(this);
	}

	public void setRootConceptClass(Class rootConceptClass) {
		this.rootConceptClass = rootConceptClass;
	}

	public Class getRootConceptClass() {
		return rootConceptClass;
	}

	
//	public Class getRootConceptClass() {
//		return getStaticRootConceptClass();
//	}
	
//	public static Class getStaticRootConceptClass(){
//		String rc = RESOURCE_BUNDLE.getString("rootconcept");
//		Class c = null;
//		try {
////			See: http://www.theserverside.com/articles/article.tss?l=dm_classForname
//			c = Class.forName(rc,true,Thread.currentThread().getContextClassLoader());
//		} catch (ClassNotFoundException e) {
//			throw new RuntimeException("Unable to load class " + rc,e);
//		}
//		return c;
//	}
	
}
